<?php /* Smarty version 2.6.18, created on 2016-12-13 14:56:55
         compiled from score/folsubject.tpl.php */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.header.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.left.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  <!--主要内容开始-->
<div class="content-wrapper">
    <section class="content">
        <div class="row">
            <section class="col-lg-2 connectedSortable" style="padding-right:0px;">
                <form action="" method="post">
                <div class="box box-solid">
                    <div class="box-header with-border">
                        <label>选择科目</label>
                        <div class="form-group" style="padding-left:10px; height:120px; overflow-y:scroll; margin-bottom:30px;">
                            <label><input type="radio" name="subject_id" value="all"> 总分</label><br/>
                            <?php $_from = $this->_tpl_vars['subject_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                            <label><input type="radio" name="subject_id" value="<?php echo $this->_tpl_vars['value']['subject_id']; ?>
"> <?php echo $this->_tpl_vars['value']['subject_name']; ?>
</label><br/>
                            <?php endforeach; endif; unset($_from); ?>
                        </div>

                    </div>
                </div><!--box box-solid-->
                <div class="box box-solid">
                    <div class="box-header with-border">
                        <label>选择年级</label>
                        <div class="form-group class" style="height:100px; overflow-y:scroll;" id="number3">

                            <label><input type="checkbox" name="allChecked" id="allChecked" onclick="DoCheck()"> 全选 </label><br/>
                            <?php $_from = $this->_tpl_vars['grade_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                            <label><input type="checkbox" name="grade_id[]" value="<?php echo $this->_tpl_vars['value']['grade_id']; ?>
"> <?php echo $this->_tpl_vars['value']['grade_name']; ?>
 </label><br/>
                            <?php endforeach; endif; unset($_from); ?>
                        </div>
                        <button type="submit" class="btn btn-primary btn-sm">确 定</button>
                    </div>
                </div><!--box box-solid-->
                </form>
            </section>
            <section class="col-lg-10 connectedSortable">
                <div class="box box-default box-solid">
                    <form action="" method="get">
                        <div class="box-header with-border">
                            <span class="fa fa-step-forward" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                            <p class="box-title">学科成绩质量跟踪</p>
                            <a href="" class="btn btn-warning btn-sm" style="float:right;">导 出</a>
                        </div>
                        <div class="box-body">
                            <div class="col-md-6 col-xs-12 form-group" style="padding:0;">
                                <label class="col-sm-1 control-label text-right">
                                    从
                                </label>
                                <div class="input-group col-md-5" style="float:left;">
                                    <select class="form-control" id="semester_id" name="semester_id1">
                                        <option value="0">-请选择-</option>
                                        <?php $_from = $this->_tpl_vars['semester_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                        <option value="<?php echo $this->_tpl_vars['value']['semester_id']; ?>
"><?php echo $this->_tpl_vars['value']['semester_name']; ?>
</option>
                                        <?php endforeach; endif; unset($_from); ?>
                                    </select>
                                </div>
                                <span style="float:left; font-weight:bold;">  至 </span >
                                <div class="input-group col-md-5" >
                                    <select class="form-control" id="semester_id" name="semester_id2">
                                        <option value="0">-请选择-</option>
                                        <?php $_from = $this->_tpl_vars['semester_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                        <option value="<?php echo $this->_tpl_vars['value']['semester_id']; ?>
"><?php echo $this->_tpl_vars['value']['semester_name']; ?>
</option>
                                        <?php endforeach; endif; unset($_from); ?>
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-3 form-group">
                                <div class="input-group col-sm-8 col-xs-8" style="float:left; margin-right:8px;">
                                    <select class="form-control"  name="exam_type">
                                        <?php $_from = $this->_tpl_vars['exam_type_ini']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                        <option value="<?php echo $this->_tpl_vars['key']; ?>
"><?php echo $this->_tpl_vars['value']; ?>
</option>
                                        <?php endforeach; endif; unset($_from); ?>
                                        <option value="all">全部考</option>
                                    </select>
                                </div>

                                <input type="hidden" name="a" value="score.folsubject">
                                <button type="submit" class="btn btn-primary">查 询</button>
                            </div>
                            <div style="clear:both; height:10px;"></div>
                            <h4 class="text-center">考试成绩一览表</h4>
                            <table class="table table-bordered"  id="mytable">
                                <thead>
                                <tr>
                                    <td>学科</td>
                                    <td>班级</td>
                                    <td>当前科任</td>
                                    <td>平均分</td>
                                    <td>级排名</td>
                                    <td>原科任</td>
                                    <td>平均分</td>
                                    <td>级排名</td>
                                </tr>
                                </thead>
                                <?php $_from = $this->_tpl_vars['class_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                <tr>
                                    <td><?php echo $this->_tpl_vars['subject_name']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['value']['class_name']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['value']['teacher']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['value']['score']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['value']['rank']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['value']['teacher2']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['value']['score2']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['value']['rank2']; ?>
</td>
                                </tr>
                                <?php endforeach; endif; unset($_from); ?>

                            </table>

                        </div><!--box-body -->
                        <div class="box-footer text-center">

                    </form>
                </div><!--box box-default box-solid-->
            </section>
        </div><!--row-->
    </section>
</div>
  <!--主要内容结束-->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.footer.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<script>
    //checbox全选
    function DoCheck()
    {
        var ch=document.getElementsByName("grade_id[]");
        if(document.getElementsByName("allChecked")[0].checked==true)
        {
            for(var i=0;i<ch.length;i++)
            {
                ch[i].checked=true;
            }
        }else{
            for(var i=0;i<ch.length;i++)
            {
                ch[i].checked=false;
            }
        }
    }
</script>

<script src="static/js/jquery.canvasjs.min.js"></script>
<script type="text/javascript">
    $(function () {
        $(".chartContainer").CanvasJSChart({
            title: {
                text: "考试排名趋势",
                fontSize: 16
            },
            axisX: {
                gridColor: "Silver",
                tickColor: "silver",
                interval: 10,
            },
            toolTip: {
                shared: true
            },
            data: [
//                {
//                    showInLegend: true,
//                    name: "语文",//科目
//                    type: "line",
//                    markerType: "square",
//                    dataPoints: [
//                        { x: 10, label: "高一上学期", y: 112 },//考试名称    排名
//                        { x: 20, label: "高一下学期", y: 120 },
//                        { x: 30, label: "高二上学期", y: 108 },
//                        { x: 40, label: "高二下学期", y: 90 },
//                        { x: 50, label: "高三上学期", y: 99 },
//                        { x: 60, label: "高三下学期", y: 140 },
//                    ]
//                },{
//                    showInLegend: true,
//                    name: "数学",
//                    type: "line",
//                    dataPoints: [
//                        { x: 10, label: "高一上学期", y: 126 },
//                        { x: 20, label: "高一下学期", y: 130 },
//                        { x: 30, label: "高二上学期", y: 100 },
//                        { x: 40, label: "高二下学期", y: 120 },
//                        { x: 50, label: "高三上学期", y: 99 },
//                        { x: 60, label: "高三下学期", y: 120 },
//                    ]
//                },{
//                    showInLegend: true,
//                    name: "英语",
//                    type: "line",
//                    dataPoints: [
//                        { x: 10, label: "高一上学期", y: 138 },
//                        { x: 20, label: "高一下学期", y: 120 },
//                        { x: 30, label: "高二上学期", y: 90 },
//                        { x: 40, label: "高二下学期", y: 105 },
//                        { x: 50, label: "高三上学期", y: 120 },
//                        { x: 60, label: "高三下学期", y: 130 },
//                    ]
//                },{
//                    showInLegend: true,
//                    name: "名次",
//                    type: "line",
//                    dataPoints: [
//                        { x: 10, label: "高一上学期", y: 12},
//                        { x: 20, label: "高一下学期", y: 23 },
//                        { x: 30, label: "高二上学期", y: 34 },
//                        { x: 40, label: "高二下学期", y: 19 },
//                        { x: 50, label: "高三上学期", y: 20 },
//                        { x: 60, label: "高三下学期", y: 5 },
//                    ]
//                },
                <?php $_from = $this->_tpl_vars['subject_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
        {
            showInLegend: true,
                name: "<?php echo $this->_tpl_vars['value']['subject_name']; ?>
",//科目
            type: "line",
            markerType: "square",
            dataPoints: [
            <?php $_from = $this->_tpl_vars['all']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['foo'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['foo']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['foo']['iteration']++;
?>
            { x: <?php echo $this->_foreach['foo']['iteration']; ?>
0, label: "<?php echo $this->_tpl_vars['v']['exam']; ?>
", y: <?php echo $this->_tpl_vars['v']['sub'][$this->_tpl_vars['value']['subject_id']]['rank']; ?>
 },//考试名称    排名
            <?php endforeach; endif; unset($_from); ?>

        ]
        },
        <?php endforeach; endif; unset($_from); ?>
            ]
        });
    });
</script>